/*
 * @Description: 
 * @version: 
 * @Author: wyx
 * @Date: 2020-09-22 15:22:58
 * @LastEditDate: Do not exit
 */
import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: () => import(/* webpackChunkName: "about" */ '../views/layout/Home.vue')
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import(/* webpackChunkName: "about" */ '../views/login/Login.vue')
  },
  {
    path: '/register',
    name: 'Register',
    component: () => import(/* webpackChunkName: "about" */ '../views/login/Register.vue')
  },
  {
    path: '/find',
    name: 'Find',
    component: () => import(/* webpackChunkName: "about" */ '../views/login/Find.vue')
  },
  {
    path: '/detail',
    name: 'Detail',
    component: () => import(/* webpackChunkName: "about" */ '../views/detail/Detail.vue')
  },
  {
    path: '/member',
    name: 'Member',
    component: () => import(/* webpackChunkName: "about" */ '../views/member/Member.vue'),
    children: [
      {
        path: '/memberCenter',
        name: 'MemberCenter',
        component: () => import(/* webpackChunkName: "about" */ '../views/member/home/MemberCenter.vue'),

      },
      {
        path: '/order',
        name: 'Order',
        component: () => import(/* webpackChunkName: "about" */ '../views/member/order/Order.vue'),

      },
      {
        path: '/address',
        name: 'Address',
        component: () => import(/* webpackChunkName: "about" */ '../views/member/address/Address.vue'),

      },
      {
        path: '/security',
        name: 'Security',
        component: () => import(/* webpackChunkName: "about" */ '../views/member/security/Security.vue'),

      },
      {
        path: '/info',
        name: 'MemberInfo',
        component: () => import(/* webpackChunkName: "about" */ '../views/member/info/MemberInfo.vue'),

      },
      {
        path: '/updatePass',
        name: 'UpdatePass',
        component: () => import(/* webpackChunkName: "about" */ '../views/member/security/UpdatePass.vue'),

      },
      {
        path: '/updatePhone',
        name: 'UpdatePhone',
        component: () => import(/* webpackChunkName: "about" */ '../views/member/security/UpdatePhone.vue'),

      },
      {
        path: '/updateEmail',
        name: 'UpdateEmail',
        component: () => import(/* webpackChunkName: "about" */ '../views/member/security/UpdateEmail.vue'),

      },

    ]
  },
  {
    path: '/goods',
    name: 'Goods',
    component: () => import(/* webpackChunkName: "about" */ '../views/goods/Goods.vue')
  },
  {
    path: '/allGoods',
    name: 'AllGoods',
    component: () => import(/* webpackChunkName: "about" */ '../views/goods/AllGoods.vue')
  },
  {
    path: '/car',
    name: 'Car',
    component: () => import(/* webpackChunkName: "about" */ '../views/car/Car.vue')
  },
  {
    path: '/buy',
    name: 'Buy',
    component: () => import(/* webpackChunkName: "about" */ '../views/car/Buy.vue')
  },
  {
    path: '/about',
    name: 'About',
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
